package com.unionfetch.content_home.api

import com.unionfetch.content_home.bean.TradeDataDetail
import com.unionftech.common.bean.ResponseResult
import retrofit2.http.GET
import retrofit2.http.Header
import retrofit2.http.Query

interface HomeApi {

    /**
     * 获取账户详细资金信息（净值，保证金）
     */
    @GET("trade/user/trader/accNum01User")
    suspend fun getLiveTradeDataDetail(
        @Header("Authorization") token: String,
        @Query("login") tradeNo: String
    ): ResponseResult<TradeDataDetail>

    @GET("trade/user/demo/accNum01User")
    suspend fun getDemoTradeDataDetail(
        @Header("Authorization") token: String,
        @Query("login") tradeNo: String
    ): ResponseResult<TradeDataDetail>


    /**
     * 更新浮动盈余
     */
    @GET("trade/user/trader/queryProfit")
    suspend fun getFloatSurplus(
        @Header("Authorization") token: String,
        @Query("login") tradeNo: String,
        @Query("type") type: Int
    ): ResponseResult<String>

}